#include <iostream>
using namespace std;
int main()
{
    long long d[51],n,a,b,i;
    d[1]=d[2]=1;
    cin>>n;
    while (n--)
    {
        cin>>a>>b;
        b=b-a+1;
        if (b<=2)cout<<d[b]<<endl;
        else
        {
            for (i=3;i<=b;i++)d[i]=d[i-1]+d[i-2];
            cout<<d[b]<<endl;
        }
    }
    return 0;
}
